package com.superb.allocation.api.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import com.baomidou.mybatisplus.annotation.TableName;
import com.superb.common.database.entity.BaseEntity;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 数据字典
 *
 * @Author: ajie
 * @CreateTime: 2024-6-18
 */
@Data
@TableName("allocation_dict")
@Tag(name = "数据字典")
@EqualsAndHashCode(callSuper = false)
public class AllocationDict extends BaseEntity {

    @NotBlank(message = "类型名称不能为空")
    @Schema(description = "类型名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String name;

    @NotBlank(message = "字典类型不能为空")
    @Schema(description = "字典类型", requiredMode = Schema.RequiredMode.REQUIRED)
    private String code;

    @Schema(title = "状态", description = "0启用1禁用")
    private Integer status;

    @Schema(description = "字典类型")
    @NotNull(message = "字典类型不能为空")
    private String dictType;

    @Schema(title = "类型", description = "0主要1信息2危险3警告4成功", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer type;

    @Schema(description = "排序")
    private String sort;

    @Schema(hidden = true)
    @TableField(exist = false)
    private String organId;
}